import { ColumnProps } from '~/library/components/ProTable/interface'
import { StoreManagement } from '~/src/api/interface/storeManagement'
import { checkFlag } from '~/src/utils/serviceDict'

export const merchantColumns: ColumnProps<StoreManagement.Merchant>[] = [
  { type: 'index', label: '序号', width: 60 },
  {
    sortable: true,
    prop: 'id',
    label: '商户ID',
    align: 'left',
    minWidth: 120,
    search: { el: 'input', label: '商户搜索', key: 'storeName' },
  },
  { sortable: true, prop: 'storeName', label: '商户名称', minWidth: 150, align: 'left' },
  { sortable: true, prop: 'userName', label: '用户名称', minWidth: 120, align: 'left' },
  { sortable: true, prop: 'activationCode', label: '邀请码', minWidth: 100, align: 'left' },
  { sortable: true, prop: 'mobile', label: '联系电话', minWidth: 120, align: 'left' },
  { sortable: true, prop: 'createTime', label: '注册时间', minWidth: 164, align: 'left' },
  { sortable: true, prop: 'defaultPassWord', label: '默认密码', minWidth: 164, align: 'left' },
  { sortable: true, prop: 'endDate', label: '到期时间', minWidth: 164, align: 'left' },
  { sortable: true, prop: 'smsSign', label: '短信签名', minWidth: 120, align: 'left' },
  { sortable: true, prop: 'smsCheckFlag', label: '签名审核状态', minWidth: 140, enum: checkFlag },
  { sortable: true, prop: 'smsSignApplyTime	', label: '签名申请时间', minWidth: 164, align: 'left' },
  { sortable: true, prop: 'parentStoreId', label: '上级商户编码', minWidth: 140, align: 'left' },
  { sortable: true, prop: 'parentStoreName', label: '上级商户名称', minWidth: 140, align: 'left' },
  { sortable: true, prop: 'linkMan', label: '联系人', minWidth: 164, align: 'left' },
  { sortable: true, prop: 'address', label: '门店详细信息', minWidth: 164, align: 'left' },
  { prop: 'operation', label: '操作', minWidth: 200, fixed: 'right' },
]
